// 提供成员属性的访问方法
function Person() {
  this.name = 'aa'
  this.age = 11
  this.getAage = function () {
    return this.age
  }
}
const p1 = new Person()
const a = p1.getAage()

// 直接让成员属性访问
function Person2() {
  this.name = 'aa'
  this.age = 11
}
const p2 = new Person2()
const b = p2.age